package day2;

/**
 * @author oldliu
 * @since 1.0
 */
public class TeacherTesst2 {
    public static void main(String[] args) {
        Teacher xiaomalaosh=new Teacher();
        xiaomalaosh.name="老刘";
        xiaomalaosh.age=30;
        xiaomalaosh.goodAt="java and html";

        Teacher xiaodinglaoshi=xiaomalaosh;//对象之间的赋值。。。
        System.out.println(xiaomalaosh);
        System.out.println(xiaodinglaoshi);
        System.out.println("小马的老师信息如下：");
        xiaomalaosh.selfIntro();
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        System.out.println("小丁的老师信息如下：");
        xiaodinglaoshi.selfIntro();
        System.out.println(">>>>>>>>>>>>>一年后>>>>>>>>>>>>>>>>>>");
        xiaomalaosh.age++;
        xiaodinglaoshi.goodAt="java，linux+前端";
        System.out.println("小马的老师信息如下：");
        xiaomalaosh.selfIntro();
        System.out.println("--------------------------");
        System.out.println("小丁的老师信息如下：");
        xiaodinglaoshi.selfIntro();

        Teacher xiaowuTeaher=xiaodinglaoshi;
        System.out.println(xiaowuTeaher==xiaomalaosh);//对象，==比较的是引用地址
    }
}
